<template>
  <div class="ma-content-block lg:flex justify-between p-4">
    <!-- CRUD 组件 -->
    <ma-crud :options="options" :columns="columns" ref="crudRef">
      <template #all_number="{ record }">
        <div>{{ record?.all_number }} / {{ (record?.all_weight - 0).toFixed(3) }}</div>
      </template>
      <template #all_number_yu="{ record }">
        <div>{{ record?.all_number_yu }} / {{ (record?.all_weight_yu - 0).toFixed(3) }}</div>
      </template>
      <!-- <template #load_status="{ record }">
        <a-tag color="blue" v-if='record.load_type != 1'>{{record.load_status == 0?'待确认':record.load_status == 1?'已完成':record.load_status == 2?'待执行':record.load_status == 3?'待预约':record.load_status == 4?'进行中':'已取消'}}</a-tag>
        <div v-if='record.load_type == 1'></div>
      </template> -->

      <template #tableBeforeButtons>
        <a-button type="primary" @click='handleAddShow'>新增</a-button>
      </template>
      <template #operationBeforeExtend="{ record }">
        <a-link @click="zhuangxieQR(record)" v-if="record.load_status == 0"
          v-auth="['prediction:load:changeStatus']">确认</a-link>
        <a-popconfirm content="是否确认已收到集装箱?" @ok="zhuangxie_HX(record)">
          <a-link v-if='record.load_status == 1 && record.load_type == 5'>确认回箱</a-link>
        </a-popconfirm>

        <a-link @click="zhuangxie_PGD(record)" v-if="record.load_status != 0"
          v-auth="['prediction:loadDetail:index']">打印装卸派工单</a-link>
        <a-link @click="zhuangxieMX(record)" v-auth="['prediction:loadDetail:index']">装卸明细</a-link>
      </template>
    </ma-crud>
    <!-- 装卸明细 -->
    <a-drawer :footer="false" :width="1400" v-model:visible="loadDetailShow" @cancel="handlestationCancel">
      <template #title>
        装卸明细
      </template>
      <loadDetail ref="loadDetailRef" :inforows="inforow" v-if='loadDetailShow' />
    </a-drawer>

    <!-- 打印装卸派工单 -->
    <a-modal :mask-closable="false"  width="auto" :top="40" v-model:visible="show" :alignCenter="false" :body-style="{
      padding: 0,
    }" v-if="show">
      <template #title> 打印 </template>

      <div class="view-content">
        <div style="display:flex;flex-direction:column" id="viewContent">
          <div class="form">
            <!-- <div class="form-items" v-if="load_type == 1">
              <lable>司机： </lable>
              
              <a-select v-model="driver_id" placeholder="请选择司机..." multiple  allow-clear >
                <a-option v-for="(item,index) in driverList" :key="index">{{item.car_no}}</a-option>
              </a-select>
            </div> -->
            <div class="form-item" style='align-items:flex-start'>
              <lable>备注： </lable><a-textarea v-model="remarks" @input="editRemarks"></a-textarea>
            </div>
          </div>

          <prientTable :columns="p_columns.value" :data="p_data" :t_drivers="t_drivers" title="装卸派工单"
            :load_type="load_type" v-if="show && load_type != 5"></prientTable>
          <div id='viewContents' v-if="show && load_type == 5">
            <prientTablehx :columns="p_columns.value" :data="p_data" :t_drivers="t_drivers" title="装火车作业派工单"
              :load_type="load_type"></prientTablehx>
          </div>

        </div>

      </div>

      <template #footer>
        <a-button v-print="printObj" type="primary">打印</a-button>
      </template>
    </a-modal>

    <!-- 新增 -->
    <a-modal :mask-closable="false"  width="900px" v-model:visible="addShow" title="新增" @cancel="handleCel" :on-before-ok='handleAddAPI'>
      <a-form :model="form">
        <a-form-item field="load_status" label="装卸状态">
          <a-select v-model="formItem.load_status" :options="loadStatusList"
            :field-names="{ value: 'value', label: 'title' }" :style="{ width: '320px' }" placeholder="请选择装卸状态" />
        </a-form-item>
        <a-form-item field="load_type" label="装卸类型">
          <a-select v-model="formItem.load_type" :options="loadTypeList" :field-names="{ value: 'value', label: 'title' }"
            :style="{ width: '320px' }" placeholder="请选择装卸类型" />
        </a-form-item>
        <a-form-item field="daozhan" label="到站" v-if='formItem.load_type == 5'>
          <a-input v-model="formItem.daozhan" :style="{ width: '320px' }" placeholder="请输入到站" allow-clear />
        </a-form-item>
        <a-form-item field="back_no" label="集装箱调令" v-if='formItem.load_type == 5'>
          <a-input v-model="formItem.back_no" :style="{ width: '320px' }" placeholder="请输入集装箱调令" allow-clear />
        </a-form-item>
        <a-form-item field="remark" label="备注">
          <a-textarea v-model="formItem.remark" placeholder="请输入备注" allow-clear />
        </a-form-item>
      </a-form>
    </a-modal>

    <!-- 确认弹窗 -->
    <a-modal :mask-closable="false"  width="900px" v-model:visible="xiafaShow" title="下发装卸任务" :on-before-ok="hadnleChangeBanzu" >
      <a-table :scroll="{ x: '100%' }" :data="xia_data" :columns="xia_columns" :pagination="false">
        <template #banzu_id="{ record, rowIndex }">
          <a-select v-model="record.banzu_id" placeholder="班组">
            <a-option v-for="(item, index) in banzuList" :key="index" :value="item.id" :label="item.name" />
          </a-select>
        </template>
      </a-table>
    </a-modal>
  </div>
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import predictionLoad from '@/api/prediction/predictionLoad'
import { Message } from '@arco-design/web-vue'
import loadDetail from '@/views/prediction/loadDetail/index.vue'
import prientTable from "@/components/prientTable/index.vue";
import prientTablehx from "./loadprientTable.vue";
import predictionOrderDetail from "@/api/prediction/predictionOrderDetail";
import tool from '@/utils/tool'
import commonApi from "@/api/common";
import * as common from '@/utils/common'
import { request } from "@/utils/request.js";

const crudRef = ref()
const xiafaShow = ref(false)
const xia_columns = ref([])
const xia_data = ref([])
const banzuList = ref([])
const show = ref(false)
const loadDetailShow = ref(false)
const loadDetailRef = ref()
const load_type = ref()
const driver_id = ref([])
const driverList = ref([])
const t_drivers = ref([])
const addShow = ref(false)
const inforow = ref({})
const tijiaoList = ref([])
onMounted(() => {
  handleBanzu()
});
const loadTypeList = ref([
  {
    title: '提货', value: '1', disabled: true,
  },
  {
    title: '入库', value: '2', disabled: true,
  },
  {
    title: '还箱', value: '3', disabled: true,
  },
  {
    title: '卸火车', value: '4', disabled: false,
  },
  {
    title: '集装箱回箱', value: '5', disabled: false,
  },
])
const hadnleChangeBanzu = async (e, index) => {
  let arr = []
  
  tijiaoList.value = xia_data.value
  let res = await request({
    url: "prediction/load/confirm",
    method: "post",
    data: {
      items: tijiaoList.value
    }
  })
  if(res.code == 200){
    Message.success('确认下发装卸任务成功')
    crudRef.value.refresh()
    return true
  }else{
    Message.error(res.message)
    return false
  }
  
  
}
const handleQueren = () => {
  request({
    url: "prediction/load/confirm",
    method: "post",
    data: {
      items: tijiaoList.value
    }
  }).then((res) => {
    Message.success('确认下发装卸任务成功')
    crudRef.value.refresh()
  });
}
const handleBanzu = () => {
  request({
    url: "prediction/banzu/index",
    method: "get",
    params: {
      page: 1,
      pageSize: 100,
    },
  }).then((res) => {
    console.log(res)
    banzuList.value = res.data.items
  });
}
const loadStatusList = ref([
  { title: '待确认', value: '0' },
  { title: '已完成', value: '1', disabled: true, },
  { title: '待执行', value: '2' },
  { title: '待预约', value: '3', disabled: true, },
  { title: '进行中', value: '4', disabled: true, },
  { title: '已取消', value: '5', disabled: true, },
])
const formItem = reactive({
  load_status: '',
  load_type: '',
  daozhan: "",
  back_no: '',
  remark: '',
})
const handleAddShow = () => {
  addShow.value = true
  formItem.load_status = ''
  formItem.load_type = ''
  formItem.daozhan = ''
  formItem.back_no = ''
  formItem.remark = ''
}
const handleCel = () => {
  addShow.value = false
}
const handleAddAPI = async () => {
  if (formItem.load_status == '') {
    Message.error('请选择装卸状态')
    return false
  }
  if (formItem.load_type == '') {
    Message.error('请选择装卸类型')
    return false
  }
  if (formItem.load_type == '5' && formItem.back_no == '') {
    Message.error('请输入集装箱调令')
    return false
  }
  if (formItem.load_type == '5' && formItem.daozhan == '') {
    Message.error('请输入到站')
    return false
  }
  let res = await predictionLoad.save(formItem)
  if(res.code == 200){
    Message.success(res.message)
    crudRef.value.refresh()
    addShow.value = false
    return true
  }else{
    Message.error(res.message)
    return false
  }
  
}
const zhuangxie_HX = (row) => {
  request({
    url: "prediction/load/changeStatus",
    method: "put",
    data: {
      id: row.id,
      statusValue: 6,
      statusName: 'load_status'
    },
  }).then((res) => {
    Message.success('回箱已确认')
    crudRef.value.refresh()
  });
}
let printObj = {

};
const zhuangxieMX = (row) => {
  // loadDetailRef.value.open(row);
  inforow.value = row
  loadDetailShow.value = true;
}

const handlestationCancel = () => {
  crudRef.value.refresh()
}

const zhuangxie_PGD = async (row) => {
  await request({
    url: "prediction/loadDetail/index",
    method: "get",
    params: {
      page: 1,
      pageSize: 1000,
      load_id: row.id,
      load_type: row.load_type
    },
  }).then((res) => {
    let arr = res.data.items

    arr.map((v, i) => {
      v.w_item = row.load_type == 1 ? '提货' : row.load_type == 2 ? '入库' : row.load_type == 3 ? '还箱' : row.load_type == 4 ? '卸火车' : row.load_type == 5 ? '回箱' : '装火车'
      if (row.load_type == 1 && v.warehouse_data == '') {
        v.w_address = (v.work_line || "") + (v.transport_number || "")
      } else if (row.load_type == 1 && v.warehouse_data != '') {
        v.w_address = v.warehouse_data
      } else if (row.load_type == 2 && v.warehouse_data == '') {
        v.w_address = (v.work_line || "") + (v.transport_number || "")
      } else if (row.load_type == 2 && v.warehouse_data != '') {
        v.w_address = v.warehouse_data
      } else if (row.load_type == 3) {
        v.w_address = ''
      } else if (row.load_type == 4) {
        v.w_address = (v.work_line || "") + (v.transport_number || "")
        v.is_taoxiangs = v.is_taoxiang == 1 ? '是' : '-'
      } else if (row.load_type == 5) {
        v.w_address = (v.work_line || "") + (v.transport_number || "")
        v.box_type = v?.box?.box_type
        v.boxs = ''
        v.boxz = ''
        v.remarks = ''
        v.work_nickname = v.detail_load_status != 0 ? v.user.nickname : ''
      }
      v.weight = (v.weight - 0).toFixed(3)
    });
    if (row.load_type == 1) {   // 提货
      if (arr.length != 0) {
        p_columns.value = [
          {
            title: "作业地点",
            dataIndex: "w_address",
          },
          {
            title: "作业项目",
            dataIndex: "w_item",
          },
          {
            title: "车号",
            dataIndex: "car_no",
          },
          {
            title: "品名",
            dataIndex: "goods_name",
          },
          {
            title: "箱号",
            dataIndex: "box",
          },
          {
            title: "件数",
            dataIndex: "number",
          },
          {
            title: "重量",
            dataIndex: "weight",
          },
          // {
          //   title: "班组",
          //   dataIndex: "banzu_name",
          // },
        ];
      }

    } else if (row.load_type == 2) {   // 入库
      if (arr.length != 0) {
        p_columns.value = [
          {
            title: "作业地点",
            dataIndex: "w_address",
          },
          {
            title: "作业项目",
            dataIndex: "w_item",
          },
          {
            title: "车号",
            dataIndex: "car_no",
          },
          {
            title: "品名",
            dataIndex: "goods_name",
          },
          {
            title: "箱号",
            dataIndex: "box",
          },
          {
            title: "件数",
            dataIndex: "number",
          },
          {
            title: "重量",
            dataIndex: "weight",
          },
          // {
          //   title: "班组",
          //   dataIndex: "banzu_name",
          // },
        ];
      }
    } else if (row.load_type == 4) {  // 卸火车
      p_columns.value = [
        {
          title: "作业地点",
          dataIndex: "w_address",
        },
        {
          title: "作业项目",
          dataIndex: "w_item",
        },
        {
          title: "车号",
          dataIndex: "car_no",
        },
        {
          title: "品名",
          dataIndex: "goods_name",
        },
        {
          title: "箱号",
          dataIndex: "box",
        },
        {
          title: "件数",
          dataIndex: "number",
        },
        {
          title: "是否掏箱",
          dataIndex: "is_taoxiangs",
        },
        // {
        //   title: "班组",
        //   dataIndex: "banzu_name",
        // },
      ];

    } else if (row.load_type == 5) {
      p_columns.value = [
        {
          title: "作业地点",
          dataIndex: "w_address",
        },
        {
          title: "作业项目",
          dataIndex: "w_item",
        },
        {
          title: "车号",
          dataIndex: "car_no",
        },
        {
          title: "箱号",
          dataIndex: "boxs",
        },
        {
          title: "箱号",
          dataIndex: "boxz",
        },
        {
          title: "装车",
          dataIndex: "work_nickname",
        },
        // {
        //   title: "班组",
        //   dataIndex: "banzu_name",
        // },
        {
          title: "备注",
          dataIndex: "remarks",
        },

      ];
    } else if (row.load_type == 6) {
      p_columns.value = [
        {
          title: "作业地点",
          dataIndex: "w_address",
        },
        {
          title: "作业项目",
          dataIndex: "w_item",
        },
        {
          title: "车号",
          dataIndex: "car_no",
        },
        {
          title: "品名",
          dataIndex: "goods_name",
        },
        {
          title: "箱号",
          dataIndex: "box",
        },
        {
          title: "件数",
          dataIndex: "number",
        },
        
        // {
        //   title: "班组",
        //   dataIndex: "banzu_name",
        // },
      ];
    }
    if (row.load_type == 4) {
      arr.sort((a, b) => {
        let numA = +a.transport_number.match(/\d+/); // 提取字符串中的数字并转换成数字类型
        let numB = +b.transport_number.match(/\d+/);
        return numA - numB; // 按升序排序
      });
    }
    p_data.value = arr
  });
  if (row.load_type == 1) {
    let aa = await predictionOrderDetail.getdriverOrder({
      order_id: row.order_id,
      pageSize: 200,
    });
    let ids = []
    driverList.value = aa.data
    aa.data.map((v, i) => {
      ids.push(v.car_no)
    })
    driver_id.value = ids
  }
  remarks.value = ''
  t_drivers.value = row.deriver_car_no
  load_type.value = row.load_type
  // loadTypeName.value = row.load_type == 1?'提货':row.load_type == 2?'入库':row.load_type == 3?'还箱':'卸火车',
  printObj = {
    id: load_type.value == 5 ? 'viewContents' : "viewContent",
    popTitle: "页面打印",
  }
  show.value = true;
}

// 表单所需要的字段
const remarks = ref("");

const p_columns = reactive([])

const p_data = ref([]);

function editRemarks(e) {
  p_data.value.forEach((item) => {
    item.remarks = e;
  });
}

function changeAds(e) {
  p_data.value.forEach((item) => {
    item.w_address = e;
  });
}

function changeItem(e) {
  p_data.value.forEach((item) => {
    item.w_item = e;
  });
}

const numberOperation = (newValue, id, numberName) => {
  predictionLoad.numberOperation({ id, numberName, numberValue: newValue }).then(res => {
    res.success && Message.success(res.message)
  }).catch(e => { console.log(e) })
}

const switchStatus = (statusValue, id, statusName) => {
  predictionLoad.changeStatus({ id, statusName, statusValue }).then(res => {
    res.success && Message.success(res.message)
  }).catch(e => { console.log(e) })
}


const zhuangxieQR = (row) => {
  let arr = row.detail
  console.log(row)
  arr.map((v, i) => {
    v.w_item = row.load_type == 1 ? '提货' : row.load_type == 2 ? '入库' : row.load_type == 3 ? '还箱' : row.load_type == 4 ? '卸火车' : row.load_type == 4 ? '返空箱' : '装火车'
    v.banzu_id = ''
    v.banzu_name = ''
    v.load_id = row.id
    if (row.load_type == 1 && v.warehouse_data == '') {
      v.w_address = ((v.work_line || '') + ' ' + (v.transport_number || '')) || '-'
    } else if (row.load_type == 1 && v.warehouse_data != '') {
      v.w_address = v.warehouse_data || '-'
    } else if (row.load_type == 2 && v.warehouse_data == '') {
      v.w_address = ((v.work_line || '') + ' ' + (v.transport_number || '')) || '-'
    } else if (row.load_type == 2 && v.warehouse_data != '') {
      v.w_address = v.warehouse_data || '-'
    } else if (row.load_type == 3) {
      v.w_address = ''
    } else if (row.load_type == 4) {
      v.w_address = ((v.work_line || '') + ' ' + (v.transport_number || '')) || '-'
      v.is_taoxiangs = v.is_taoxiang == 1 ? '是' : '-'
    } else if (row.load_type == 5) {
      v.w_address = ((v.work_line || '') + ' ' + (v.transport_number || '')) || '-'
      v.box_type = v?.box?.box_type
      v.box = v?.box?.box
      v.work_nickname = v.detail_load_status != 0 ? v.user.nickname : ''
    } else if (row.load_type == 6) {
      v.w_address = ((v.work_line || '') + ' ' + (v.transport_number || '')) || '-'
    }
    v.weight = (v.weight - 0).toFixed(3)
  });
  if (row.load_type == 1) {   // 提货
    if (arr.length != 0) {

      xia_columns.value = [
        {
          title: "作业地点",
          dataIndex: "w_address",
        },
        {
          title: "作业项目",
          dataIndex: "w_item",
        },
        {
          title: "车号",
          dataIndex: "car_no",
        },
        {
          title: "品名",
          dataIndex: "goods_name",
        },
        {
          title: "箱号",
          dataIndex: "box",
        },
        {
          title: "件数",
          dataIndex: "number",
        },
        {
          title: "重量",
          dataIndex: "weight",
        },
        // {
        //   title: "班组",
        //   dataIndex: "banzu_id",
        //   slotName:'banzu_id',
        //   width:180
        // },
      ];
    }
  } else if (row.load_type == 2) {   // 入库
    if (arr.length != 0) {
      xia_columns.value = [
        {
          title: "作业地点",
          dataIndex: "w_address",
        },
        {
          title: "作业项目",
          dataIndex: "w_item",
        },
        {
          title: "车号",
          dataIndex: "car_no",
        },
        {
          title: "品名",
          dataIndex: "goods_name",
        },
        {
          title: "箱号",
          dataIndex: "box",
        },
        {
          title: "件数",
          dataIndex: "number",
        },
        {
          title: "重量",
          dataIndex: "weight",
        },
        // {
        //   title: "班组",
        //   dataIndex: "banzu_id",
        //   slotName:'banzu_id',
        //   width:180
        // },
      ];
    }
  } else if (row.load_type == 4) {  // 卸火车
    xia_columns.value = [
      {
        title: "作业地点",
        dataIndex: "w_address",
      },
      {
        title: "作业项目",
        dataIndex: "w_item",
      },
      {
        title: "车号",
        dataIndex: "car_no",
      },
      {
        title: "品名",
        dataIndex: "goods_name",
      },
      {
        title: "箱号",
        dataIndex: "box",
      },
      {
        title: "件数",
        dataIndex: "number",
      },
      {
        title: "是否掏箱",
        dataIndex: "is_taoxiangs",
      },
      // {
      //   title: "班组",
      //   dataIndex: "banzu_id",
      //   slotName:'banzu_id',
      //   width:180
      // },
    ];

  } else if (row.load_type == 5) {
    xia_columns.value = [
      {
        title: "作业地点",
        dataIndex: "w_address",
      },
      {
        title: "作业项目",
        dataIndex: "w_item",
      },
      {
        title: "车号",
        dataIndex: "car_no",
      },

      {
        title: "箱号",
        dataIndex: "box",
      },

      {
        title: "装车",
        dataIndex: "work_nickname",
      },
      // {
      //   title: "班组",
      //   dataIndex: "banzu_id",
      //   slotName:'banzu_id',
      //   width:180
      // },
    ];
  } else if (row.load_type == 6) {
    xia_columns.value = [
      {
        title: "作业地点",
        dataIndex: "w_address",
      },
      {
        title: "作业项目",
        dataIndex: "w_item",
      },
      {
        title: "车号",
        dataIndex: "car_no",
      },

      {
        title: "箱号",
        dataIndex: "box",
      },

      {
        title: "件数",
        dataIndex: "number",
      },
      {
        title: "重量",
        dataIndex: "weight",
      },
    ];
  }
  if (row.load_type == 4) {

    // arr.sort((a, b) => {
    //   let numA = +a.transport_number.match(/\d+/); // 提取字符串中的数字并转换成数字类型
    //   let numB = +b.transport_number.match(/\d+/);
    //   return numA - numB; // 按升序排序
    // });
  }
  xia_data.value = arr
  xiafaShow.value = true
}

const options = reactive({
  id: 'flyos_prediction_load',
  rowSelection: {
    showCheckedAll: true
  },
  pk: 'id',
  operationColumn: true,
  operationColumnWidth: 280,
  isDbClickEdit: false,
  searchColNumber: 6,
  formOption: {
    viewType: 'modal',
    width: 600
  },
  api: predictionLoad.getList,
  recycleApi: predictionLoad.getRecycleList,
  add: {
    show: false,
    api: predictionLoad.save,
    auth: ['prediction:load:save']
  },
  edit: {
    show: false,
    api: predictionLoad.update,
    auth: ['prediction:load:update']
  },
  delete: {
    show: false,
    api: predictionLoad.deletes,
    auth: ['prediction:load:delete'],
    realApi: predictionLoad.realDeletes,
    realAuth: ['prediction:load:realDeletes']
  },
  recovery: {
    show: false,
    api: predictionLoad.recoverys,
    auth: ['prediction:load:recovery']
  },
  import: {
    show: false,
    url: 'prediction/load/import',
    templateUrl: 'prediction/load/downloadTemplate',
    auth: ['prediction:load:import']
  },
  export: {
    show: false,
    url: 'prediction/load/export',
    auth: ['prediction:load:export']
  }
})

const columns = reactive([
  {
    title: "ID",
    dataIndex: "id",
    formType: "input",
    addDisplay: false,
    editDisplay: false,
    hide: true,
    commonRules: {
      required: true,
      message: "请输入ID"
    }
  },
  {
    title: "装卸编号",
    dataIndex: "order_no",
    formType: "input",
    align: "center",
    width: 190,
    search: true
  },
  {
    title: "车号/箱号",
    dataIndex: "car_nos",
    width: 180,
    formType: "input",
    align: "center",
    search: true
  },
  {
    title: "品名",
    dataIndex: "goods_names",
    formType: "input",
    width: 180,
    align: "center",
    search: false,
  },
  {
    title: "总件数/总重量",
    dataIndex: "all_number",
    formType: "input",
    width: 180,
    align: "center",
    search: false,
  },
  {
    title: "剩余件数/剩余重量",
    dataIndex: "all_number_yu",
    formType: "input",
    width: 180,
    align: "center",
    search: false,
  },

  {
    title: "装卸类型",
    dataIndex: "load_type",
    formType: "select",
    align: "center",
    search: true,
    dict: {
      name: "load_type",
      props: {
        label: "title",
        value: "key"
      },
      translation: true
    }
  },
  {
    title: "调令",
    dataIndex: "back_no",
    formType: "input",
    align: "center",
    search: false,
  },
  {
    title: "到站",
    dataIndex: "daozhan",
    formType: "input",
    align: "center",
    search: false,
  },
  {
    title: "创建时间",
    dataIndex: "created_at",
    formType: "range",
    width: 200,
    search: true,
    addDisplay: false,
    editDisplay: false,
    sortable: {
      sortDirections: [
        "ascend",
        "descend"
      ],
      sorter: true
    },
    showTime: true
  },
  {
    title: "更新时间",
    dataIndex: "updated_at",
    formType: "date",
    addDisplay: false,
    editDisplay: false,
    hide: true,
    showTime: true
  },
  {
    title: "删除时间",
    dataIndex: "deleted_at",
    formType: "date",
    addDisplay: false,
    editDisplay: false,
    hide: true,
    showTime: true
  },
  {
    title: "创建者",
    dataIndex: "created_by",
    formType: "input",
    addDisplay: false,
    editDisplay: false,
    hide: true
  },
  {
    title: "修改者",
    dataIndex: "updated_by",
    formType: "input",
    addDisplay: false,
    editDisplay: false,
    hide: true
  }
])
</script>
<style lang="less" scoped>
.input {
  width: 100px;
  padding: 4px 12px;
  background: rgba(242, 243, 245);
  border: 1px solid rgba(242, 243, 245);
  border-radius: 4px;
  outline: none;
  /*清除input点击之后的黑色边框*/
}

.input:focus {
  background: #fff;
  border: 1px solid #1e80ff;
}

.arco-upload-wrapper {
  width: 50%;
}

.view-content {
  height: 75vh;
  width: 794px;
  display: flex;
  flex-direction: column;
}

.form {
  display: flex;
  padding: 24px 36px 0 0;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  flex: 0 0 auto;

  >.form-item {
    width: 45%;
    margin-bottom: 24px;
    display: flex;
    flex: 1 0 auto;
    padding-left: 36px;
    align-items: center;
    max-width: 100%;
    box-sizing: border-box;

    lable {
      width: 80px;
      flex-shrink: 0;
    }
  }

  .form-items {
    width: 100%;
    margin-bottom: 24px;
    display: flex;
    flex: 1 0 auto;
    padding-left: 36px;
    align-items: center;
    max-width: 100%;
    box-sizing: border-box;

    lable {
      width: 80px;
      flex-shrink: 0;
    }
  }
}
</style>
<script>export default { name: 'prediction:load' } </script>